package com.lyncs.ods.modules.company.service;

import com.lyncs.ods.modules.company.model.CompanyRelationRole;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lyncs.ods.modules.company.model.CompanyRelationRoleCount;
import com.lyncs.ods.resp.CompanyGroupInfo;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 企业关系权限信息 服务类
 * </p>
 *
 * @author alex
 * @since 2022-07-11
 */
public interface CompanyRelationRoleService extends IService<CompanyRelationRole> {

    List<CompanyRelationRoleCount> getValidRoleCount(@NotNull Long companyId, List<Long> relationIds);

    List<Long> getRelationIdsByGroupIds(@NotNull Long companyId, List<Long> groupIds);

    Map<Long, List<CompanyGroupInfo>> getRelationGroup(@NotNull Long companyId, List<Long> relationIds);

    void saveGroups(Long companyId, Long relationId, List<Long> groupIds);

    List<CompanyGroupInfo> getGroupCompanyInfos(@NotNull Long companyId, List<Long> groupIds);
}
